buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "gradle.plugin.ch.myniva.gradle:s3-build-cache:0.10.0"
        classpath "com.gradle.enterprise:com.gradle.enterprise.gradle.plugin:3.17.4"
        classpath "com.gradle:common-custom-user-data-gradle-plugin:2.0.1"
    }
}

apply plugin: 'com.gradle.develocity'
apply plugin: "com.gradle.common-custom-user-data-gradle-plugin"

rootProject.name = 'testcontainers-smoke-tests'

includeBuild '..'

// explicit include to allow Dependabot to autodiscover subprojects
include 'turbo-mode'

ext.isCI = System.getenv("CI") != null

buildCache {
    local {
        enabled = !isCI
    }
    remote(HttpBuildCache) {
        push = isCI && !System.getenv("READ_ONLY_REMOTE_GRADLE_CACHE") && System.getenv("GRADLE_ENTERPRISE_CACHE_PASSWORD")
        enabled = true
        url = 'https://ge.testcontainers.org/cache/'
        credentials {
            username = 'ci'
            password = System.getenv("GRADLE_ENTERPRISE_CACHE_PASSWORD")
        }
    }
}

develocity {
    buildScan {
        server = "https://ge.testcontainers.org/"
        publishing.onlyIf {
            it.authenticated
        }
        uploadInBackground = !isCI
        capture.fileFingerprints = true
    }

}
